A switch is a packet-forwarding device, such as a bridge (layer 2 switch) or a router (layer 3 switch), that determines the destination of individual data packets (such as Ethernet frames) and selectively forwards them across a packet switched network (such as an Internet Protocol (“IP”) or Multi-Protocol Label Switching (“MPLS”) packet switched network) according to the best route to their destination.
In addition to forwarding the packets, switches often perform programmable packet modifications on packets before forwarding them to their respective destinations. For example, a packet may require encapsulation or de-capsulation, or label switching, prior to being forwarded.
In today's packet-forwarding devices, much of the packet forwarding is performed in a switch fabric. A switch fabric is a hardware component of the packet-forwarding device. Because it is a hardware component, the switch fabric provides high-speed forwarding performance that cannot generally be achieved with software-based components. However, incorporating new, proprietary and/or enhanced features into the switch fabric, such as those supporting packet-modification, can be expensive. For example, such features may require the creation of new customized and/or programmable chipsets upon which the switch fabric is based. Alternatively, packet modification can be performed in software rather than in the switch fabric, but this can impair the performance and efficiency of the forwarding function of the packet forwarding device, especially when handling large volumes of packets.
Attempts to exploit the abilities of existing programmable chipsets to support new, proprietary and/or enhanced features for such things as packet modification include the use of an index value to identify a corresponding set of predefined commands and data that may be used to perform packet modifications on packets requiring modification prior to being forwarded. The index values are generally stored in tables along with certain packet information to which the index values pertain, such as the particular source/destination combinations that may be present in an inbound packet. The tables, as well as the sets of predefined commands and data to which the index values correspond are typically stored in external memory, but the packet modification is itself carried out in the switch fabric in order to achieve better forwarding performance and efficiency. In this manner, the indexes, commands and data can be updated as needed to accommodate changing requirements for modifying packets without having to update the switch fabric.
One of the shortcomings associated with using an index value to identify commands and data sets for modifying a packet is the lack of sufficient external memory in the switch to store the tables in which the index values are stored, as well as the increasing number of different sets of commands and data that are needed to support the increasing varied types of packet traffic being forwarded. This is especially true as the number of potential connections in the packet switched network increase and the ability of a switch to support new and changed protocols and encapsulation/de-encapsulation techniques becomes more important.